package org.gwu.seuss.communication.util;

/**
 * Password Policy
 * Must contains one digit from 0-9
 * Must contains one lowercase characters
 * Must contains one uppercase characters
 * Must contains one special symbols in the list "@#$%"
 * Must have a length at least 8 characters and maximum of 20	
 *
 */
public class PasswordValidator extends BaseValidator {

	private static final String PASSWORD_PATTERN = "((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%]).{8,20})";

	protected String getPattern(){
		return PasswordValidator.PASSWORD_PATTERN;
	}

	@Override
	protected boolean extraValidation(String value) {
		//Parent validations is sufficient..so just returning true here.
		return true;
	}
	
}